package cn.cloud.jianghai.orderservice.service;

import cn.cloud.jianghai.orderapi.entity.OrderDto;
import cn.cloud.jianghai.orderservice.domain.Order;
import cn.cloud.jianghai.orderservice.query.OrderQuery;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
* @author jianghai
* @description 针对表【t_order】的数据库操作Service
* @createDate 2022-05-22 11:52:29
*/
public interface OrderService extends IService<Order> {

    /**
     * 查询订单列表
     * @param orderQuery 查询参数
     * @Date 2022/5/22 11:54
     * @Author Jiang.h
     * @return java.util.List<cn.cloud.jianghai.orderapi.entity.OrderDto>
     **/
    List<OrderDto> findOrderList(OrderQuery orderQuery);

    /**
     *  创建订单
     * @param orderDto 新增数据
     * @Date 2022/5/22 12:54
     * @Author Jiang.h
     * @return java.lang.Boolean
     **/
    Boolean insert(OrderDto orderDto);

    /**
     *  删除
     * @param id 主键
     * @Date 2022/5/22 13:24
     * @Author Jiang.h
     * @return java.lang.Boolean
     **/
    Boolean del(Long id);

    /**
     *  更新
     * @param orderDto 数据
     * @Date 2022/5/22 13:27
     * @Author Jiang.h
     * @return java.lang.Boolean
     **/
    Boolean edit(OrderDto orderDto);

    /**
     * 根据id查询
     * @param id id
     * @Date 2022/6/1 13:49
     * @Author Jiang.h
     * @return cn.cloud.jianghai.orderapi.entity.OrderDto
     **/
    OrderDto get(Long id);

    Page<OrderDto> findByPage(OrderQuery query);
}
